<template>
  <div class="dialog">
    <el-form :model="editData">
      <el-form-item label="状态" :label-width="formLabelWidth">
        <el-select v-model="editData.userStatus" placeholder="请选择该用户的帐户状态">
            <!-- <el-option label="正常" value="0"></el-option> -->
            <el-option label="禁用" value="1"></el-option>
        </el-select>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="cancel({type: 'off'})">取 消</el-button>
      <el-button type="primary" @click="cancel({type:'on',data:{}})">确 定</el-button>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      editData: {
        type: Object
      }
    },
    data () {
      return {
        formLabelWidth: '120px'
      };
    },
    methods: {
      cancel (msg) {
        // debugger
        let type = msg.type;
        switch (type) {
            case 'on': {
              this.$emit('upData', {...this.editData});
              break;
            }
            case 'off': {
              break;
            }
        }
        this.$emit('change', false);
      }
    }
  };
</script>

<style lang='scss' scoped>
.dialog {
  .dialog-footer {
    text-align: right;
  }
}

</style>
